package com.zmt.content.test;

import com.zmt.content.config.MultipartSupportConfig;
import com.zmt.content.feignClient.MediaServiceClient;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;

@SpringBootTest
public class FeignTestUpload {

    @Autowired
    private MediaServiceClient mediaServiceClient;

    @Test
    public void testUpload(){
        //生成文件格式参数
        MultipartFile multipartFile = MultipartSupportConfig.getMultipartFile(new File("D:\\MavenProject\\xuecheng-plus\\test.html"));

        mediaServiceClient.upload(multipartFile,"course/137.html");
    }
}
